<?php
require('../cofd/common.php');
$sql = "SELECT id,phead,pbody FROM post WHERE zt = 1 ORDER BY id DESC LIMIT 0,30";
$result = $conn->query($sql);
$data=[];
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $data[]=$row;
    }
}
echo json_encode($data,JSON_UNESCAPED_UNICODE);
$conn ->close();